inherited frmSaleQuoteBill: TfrmSaleQuoteBill
  Left = 408
  Top = 157
  Caption = #38144#21806#25253#20215#21333
  PixelsPerInch = 96
  TextHeight = 12
  inherited pnlDBCtrl: TPanel
    inherited pnlThirdtrade: TPanel
      inherited lblTTtraderid: TcxLabel
        AnchorX = 78
      end
      inherited cxLabel1: TcxLabel
        Left = 216
        ExplicitLeft = 216
        AnchorX = 244
      end
      inherited lblTTBalanceid: TcxLabel
        Left = 381
        ExplicitLeft = 381
        AnchorX = 433
      end
    end
    inherited DtlPageCtrl: TcxPageControl
      Height = 235
      ExplicitHeight = 235
      ClientRectBottom = 235
      inherited tabMain: TcxTabSheet
        ExplicitHeight = 235
        inherited DtlGrid: TcxGrid
          Height = 102
          ExplicitHeight = 102
        end
        object sptBom: TcxSplitter
          Left = 0
          Top = 102
          Width = 872
          Height = 8
          Cursor = crVSplit
          HotZoneClassName = 'TcxXPTaskBarStyle'
          HotZone.SizePercent = 45
          AlignSplitter = salBottom
          Control = DtlGrid
          Visible = False
        end
        object grdBom: TcxGrid
          Left = 0
          Top = 110
          Width = 872
          Height = 125
          Align = alBottom
          PopupMenu = pmBom
          TabOrder = 2
          Visible = False
          OnEnter = grdBomEnter
          OnExit = grdBomExit
          RootLevelOptions.DetailTabsPosition = dtpTop
          object viewBomVer: TcxGridDBBandedTableView
            OnMouseDown = viewBomVerMouseDown
            Navigator.Buttons.CustomButtons = <>
            OnCustomDrawCell = viewBomVerCustomDrawCell
            OnFocusedItemChanged = viewBomVerFocusedItemChanged
            OnFocusedRecordChanged = viewBomVerFocusedRecordChanged
            DataController.DataSource = dsBomVer
            DataController.Summary.DefaultGroupSummaryItems = <>
            DataController.Summary.FooterSummaryItems = <>
            DataController.Summary.SummaryGroups = <>
            OptionsBehavior.FocusCellOnTab = True
            OptionsBehavior.FocusFirstCellOnNewRecord = True
            OptionsBehavior.GoToNextCellOnEnter = True
            OptionsBehavior.FocusCellOnCycle = True
            OptionsBehavior.ImmediateEditor = False
            OptionsBehavior.PullFocusing = True
            OptionsCustomize.ColumnHiding = True
            OptionsData.Appending = True
            OptionsData.CancelOnExit = False
            OptionsSelection.MultiSelect = True
            OptionsView.ShowEditButtons = gsebForFocusedRecord
            OptionsView.Footer = True
            OptionsView.GroupByBox = False
            OptionsView.GroupFooterMultiSummaries = True
            OptionsView.GroupFooters = gfAlwaysVisible
            OptionsView.Indicator = True
            OptionsView.IndicatorWidth = 25
            OptionsView.BandHeaders = False
            OptionsView.FixedBandSeparatorColor = clBackground
            OptionsView.FixedBandSeparatorWidth = 3
            Styles.Background = bsBackGroup
            Styles.ContentEven = bsEven
            Styles.ContentOdd = bsOdd
            Styles.Footer = bsTitle
            Styles.Header = MainDM.bsTitle
            Styles.Selection = bsSelect
            Styles.BandBackground = bsBackGroup
            Styles.BandHeader = bsTitle
            OnColumnHeaderClick = viewBomVerColumnHeaderClick
            OnCustomDrawColumnHeader = DtlGridDBTableViewCustomDrawColumnHeader
            OnCustomDrawIndicatorCell = DtlGridDBTableViewCustomDrawIndicatorCell
            OnLeftPosChanged = viewBomVerLeftPosChanged
            Bands = <
              item
                FixedKind = fkLeft
              end
              item
              end>
          end
          object viewBom: TcxGridDBBandedTableView
            Navigator.Buttons.CustomButtons = <>
            OnFocusedItemChanged = viewBomVerFocusedItemChanged
            OnFocusedRecordChanged = viewBomVerFocusedRecordChanged
            DataController.DataSource = dsBom
            DataController.Summary.DefaultGroupSummaryItems = <>
            DataController.Summary.FooterSummaryItems = <>
            DataController.Summary.SummaryGroups = <>
            OptionsBehavior.FocusCellOnTab = True
            OptionsBehavior.FocusFirstCellOnNewRecord = True
            OptionsBehavior.GoToNextCellOnEnter = True
            OptionsBehavior.FocusCellOnCycle = True
            OptionsData.Appending = True
            OptionsData.CancelOnExit = False
            OptionsSelection.MultiSelect = True
            OptionsView.ShowEditButtons = gsebForFocusedRecord
            OptionsView.Footer = True
            OptionsView.FooterMultiSummaries = True
            OptionsView.GroupByBox = False
            OptionsView.GroupFooterMultiSummaries = True
            OptionsView.GroupFooters = gfAlwaysVisible
            OptionsView.Indicator = True
            OptionsView.IndicatorWidth = 25
            OptionsView.BandHeaders = False
            OptionsView.FixedBandSeparatorColor = clBackground
            OptionsView.FixedBandSeparatorWidth = 3
            Styles.Background = bsBackGroup
            Styles.ContentEven = bsEven
            Styles.ContentOdd = bsOdd
            Styles.Footer = bsTitle
            Styles.Header = bsTitle
            Styles.Selection = bsSelect
            Styles.BandBackground = bsBackGroup
            Styles.BandHeader = bsTitle
            OnColumnHeaderClick = viewBomVerColumnHeaderClick
            OnCustomDrawColumnHeader = DtlGridDBTableViewCustomDrawColumnHeader
            OnCustomDrawIndicatorCell = DtlGridDBTableViewCustomDrawIndicatorCell
            OnLeftPosChanged = viewBomLeftPosChanged
            Bands = <
              item
                FixedKind = fkLeft
              end
              item
              end>
          end
          object viewProc: TcxGridDBBandedTableView
            Navigator.Buttons.CustomButtons = <>
            OnFocusedItemChanged = viewBomVerFocusedItemChanged
            OnFocusedRecordChanged = viewBomVerFocusedRecordChanged
            DataController.DataSource = dsProc
            DataController.Summary.DefaultGroupSummaryItems = <>
            DataController.Summary.FooterSummaryItems = <>
            DataController.Summary.SummaryGroups = <>
            OptionsBehavior.FocusCellOnTab = True
            OptionsBehavior.FocusFirstCellOnNewRecord = True
            OptionsBehavior.GoToNextCellOnEnter = True
            OptionsBehavior.FocusCellOnCycle = True
            OptionsData.Appending = True
            OptionsData.CancelOnExit = False
            OptionsView.ShowEditButtons = gsebForFocusedRecord
            OptionsView.Footer = True
            OptionsView.GroupByBox = False
            OptionsView.Indicator = True
            OptionsView.IndicatorWidth = 25
            OptionsView.BandHeaders = False
            OptionsView.FixedBandSeparatorColor = clBackground
            OptionsView.FixedBandSeparatorWidth = 3
            Styles.Background = bsBackGroup
            Styles.ContentEven = bsEven
            Styles.ContentOdd = bsOdd
            Styles.Footer = bsTitle
            Styles.Header = bsTitle
            Styles.Selection = bsSelect
            Styles.BandBackground = bsBackGroup
            Styles.BandHeader = bsTitle
            OnColumnHeaderClick = viewBomVerColumnHeaderClick
            OnCustomDrawColumnHeader = DtlGridDBTableViewCustomDrawColumnHeader
            OnCustomDrawIndicatorCell = DtlGridDBTableViewCustomDrawIndicatorCell
            OnLeftPosChanged = viewProcLeftPosChanged
            Bands = <
              item
                FixedKind = fkLeft
              end
              item
              end>
          end
          object lvlBomVer: TcxGridLevel
            Caption = #25253#20215#29256#26412
            GridView = viewBomVer
          end
          object lvlBom: TcxGridLevel
            Caption = #29289#26009#28165#21333
            GridView = viewBom
          end
          object lvlProc: TcxGridLevel
            Caption = #24037#24207
            GridView = viewProc
          end
        end
      end
      inherited tsSum: TcxTabSheet
        ExplicitHeight = 235
      end
    end
    inherited imgCheck: TcxImage
      Left = 76
      Top = 4
      TabOrder = 0
      ExplicitLeft = 76
      ExplicitTop = 4
    end
    inherited imgAbate: TcxImage
      Left = 164
      Top = 12
      TabOrder = 6
      ExplicitLeft = 164
      ExplicitTop = 12
    end
    inherited dynlblCreate_by: TcxLabel
      AnchorX = 221
    end
    inherited dynlblCheck_by: TcxLabel
      AnchorX = 429
    end
    inherited dynlblFilid: TcxLabel
      AnchorX = 88
    end
    inherited dynlblDeptid: TcxLabel
      AnchorX = 301
    end
    inherited dynlblEmpid: TcxLabel
      AnchorX = 505
    end
    inherited dynlblBKind: TcxLabel
      AnchorX = 149
    end
  end
  inherited pmExec: TPopupMenu
    Top = 77
    object muDepotAnalyse: TMenuItem [4]
      Caption = #24211#23384#20998#26512
      Visible = False
      OnClick = muDepotAnalyseClick
    end
  end
  inherited pmDetail: TPopupMenu
    object muReCalcRawMeasure: TMenuItem [14]
      Caption = #37325#26032#35745#31639#29289#26009#24230#37327#21333#20301
      OnClick = muReCalcRawMeasureClick
    end
    object muDesignPrice: TMenuItem [22]
      Caption = #26174#31034#25171#26679#25253#20215#26126#32454
    end
  end
  inherited cxStyleRepository1: TcxStyleRepository
    PixelsPerInch = 96
    inherited cxGridBandedTableViewStyleSheet1: TcxGridBandedTableViewStyleSheet
      BuiltIn = True
    end
  end
  inherited cdsMaster: TClientDataSet
    object cdsMasterbid: TIntegerField
      FieldName = 'bid'
    end
    object cdsMasterbkind: TIntegerField
      FieldName = 'bkind'
    end
    object cdsMasterbstate: TIntegerField
      FieldName = 'bstate'
    end
    object cdsMasterbcode: TStringField
      FieldName = 'bcode'
      Size = 40
    end
    object cdsMasterbdate: TDateTimeField
      FieldName = 'bdate'
    end
    object cdsMastertraderid: TIntegerField
      FieldName = 'traderid'
    end
    object cdsMasterfilid: TIntegerField
      FieldName = 'filid'
    end
    object cdsMasterdeptid: TIntegerField
      FieldName = 'deptid'
    end
    object cdsMastercreate_by: TIntegerField
      FieldName = 'create_by'
    end
    object cdsMastercheck_by: TIntegerField
      FieldName = 'check_by'
    end
    object cdsMasterempid: TIntegerField
      FieldName = 'empid'
    end
    object cdsMasterrelationcount: TByteField
      FieldName = 'relationcount'
    end
    object cdsMasteramount: TFloatField
      FieldName = 'amount'
    end
    object cdsMasterrelationamt: TFloatField
      FieldName = 'relationamt'
    end
    object cdsMastertransporttype: TIntegerField
      FieldName = 'transporttype'
    end
    object cdsMastercontactphone: TStringField
      FieldName = 'contactphone'
      Size = 40
    end
    object cdsMasterorderer: TStringField
      FieldName = 'orderer'
      Size = 60
    end
    object cdsMastercontractno: TStringField
      FieldName = 'contractno'
      Size = 40
    end
    object cdsMasterrevdate: TDateTimeField
      FieldName = 'revdate'
    end
    object cdsMastertargetaddr: TStringField
      FieldName = 'targetaddr'
      Size = 200
    end
    object cdsMasterpause: TBooleanField
      FieldName = 'pause'
    end
    object cdsMastercustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object cdsMastercustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object cdsMastercustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object cdsMastercustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object cdsMastercustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object cdsMastercustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object cdsMastercustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object cdsMastercustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object cdsMastercustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object cdsMastercustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object cdsMastercustom11: TFloatField
      FieldName = 'custom11'
    end
    object cdsMastercustom12: TFloatField
      FieldName = 'custom12'
    end
    object cdsMastercustom13: TFloatField
      FieldName = 'custom13'
    end
    object cdsMastercustom14: TFloatField
      FieldName = 'custom14'
    end
    object cdsMastercustom15: TFloatField
      FieldName = 'custom15'
    end
    object cdsMasterupdate_time: TDateTimeField
      FieldName = 'update_time'
    end
    object cdsMasterremark: TStringField
      FieldName = 'remark'
      Size = 200
    end
    object cdsMastercontacter: TStringField
      FieldName = 'contacter'
      Size = 60
    end
    object cdsMastercontactfax: TStringField
      FieldName = 'contactfax'
      Size = 40
    end
    object cdsMastercreate_time: TDateTimeField
      FieldName = 'create_time'
    end
    object cdsMastercheck_time: TDateTimeField
      FieldName = 'check_time'
    end
    object cdsMastermoneyid: TIntegerField
      FieldName = 'moneyid'
    end
    object cdsMasterexchrate: TFloatField
      FieldName = 'exchrate'
    end
    object cdsMasterdcamount: TFloatField
      FieldName = 'dcamount'
    end
    object cdsMasterdcrelationamt: TFloatField
      FieldName = 'dcrelationamt'
    end
    object cdsMasterscamt: TFloatField
      FieldName = 'scamt'
    end
    object cdsMasteriscash: TBooleanField
      FieldName = 'iscash'
    end
    object cdsMastert_code: TWideStringField
      FieldName = 't_code'
      Size = 50
    end
    object cdsMastert_name: TWideStringField
      FieldName = 't_name'
      Size = 80
    end
    object cdsMastermoneyname: TStringField
      FieldName = 'moneyname'
      Size = 60
    end
    object cdsMasterbalanceid: TIntegerField
      FieldName = 'balanceid'
    end
    object cdsMastertermdays: TIntegerField
      FieldName = 'termdays'
    end
  end
  inherited cdsDetail: TClientDataSet
    object cdsDetailbid: TIntegerField
      FieldName = 'bid'
    end
    object cdsDetailbno: TIntegerField
      FieldName = 'bno'
    end
    object cdsDetailborderno: TIntegerField
      FieldName = 'borderno'
    end
    object cdsDetaildepotid: TIntegerField
      FieldName = 'depotid'
    end
    object cdsDetailproductid: TIntegerField
      FieldName = 'productid'
    end
    object cdsDetailbomid: TIntegerField
      FieldName = 'bomid'
    end
    object cdsDetailcprice: TFloatField
      FieldName = 'cprice'
    end
    object cdsDetailbprice: TFloatField
      FieldName = 'bprice'
    end
    object cdsDetailbquantity: TFloatField
      FieldName = 'bquantity'
    end
    object cdsDetaildisc: TFloatField
      FieldName = 'disc'
    end
    object cdsDetailtaxrate: TFloatField
      FieldName = 'taxrate'
    end
    object cdsDetailtaxamt: TFloatField
      FieldName = 'taxamt'
    end
    object cdsDetailamount: TFloatField
      FieldName = 'amount'
    end
    object cdsDetailunitid: TIntegerField
      FieldName = 'unitid'
    end
    object cdsDetailquantity: TFloatField
      FieldName = 'quantity'
    end
    object cdsDetailprice: TFloatField
      FieldName = 'price'
    end
    object cdsDetailunit1qty: TFloatField
      FieldName = 'unit1qty'
    end
    object cdsDetailunit2qty: TFloatField
      FieldName = 'unit2qty'
    end
    object cdsDetailunit3qty: TFloatField
      FieldName = 'unit3qty'
    end
    object cdsDetailassqty: TFloatField
      FieldName = 'assqty'
    end
    object cdsDetailrelationassqty: TFloatField
      FieldName = 'relationassqty'
    end
    object cdsDetailproductamt: TFloatField
      FieldName = 'productamt'
    end
    object cdsDetailbatchcode: TStringField
      FieldName = 'batchcode'
      Size = 200
    end
    object cdsDetailproductdate: TDateTimeField
      FieldName = 'productdate'
    end
    object cdsDetailvaliddate: TDateTimeField
      FieldName = 'validdate'
    end
    object cdsDetailrelationpid: TIntegerField
      FieldName = 'relationpid'
    end
    object cdsDetailrelationcount: TByteField
      FieldName = 'relationcount'
    end
    object cdsDetailrelationbtype: TIntegerField
      FieldName = 'relationbtype'
    end
    object cdsDetailrelationbid: TIntegerField
      FieldName = 'relationbid'
    end
    object cdsDetailrelationbno: TIntegerField
      FieldName = 'relationbno'
    end
    object cdsDetailrelationqty: TFloatField
      FieldName = 'relationqty'
    end
    object cdsDetailioqty: TFloatField
      FieldName = 'ioqty'
    end
    object cdsDetailpause: TBooleanField
      FieldName = 'pause'
    end
    object cdsDetailcustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object cdsDetailcustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object cdsDetailcustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object cdsDetailcustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object cdsDetailcustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object cdsDetailcustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object cdsDetailcustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object cdsDetailcustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object cdsDetailcustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object cdsDetailcustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object cdsDetailexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object cdsDetailtaxprice: TFloatField
      FieldName = 'taxprice'
    end
    object cdsDetailformerprice: TFloatField
      FieldName = 'formerprice'
    end
    object cdsDetailformertaxprice: TFloatField
      FieldName = 'formertaxprice'
    end
    object cdsDetailpresent: TBooleanField
      FieldName = 'present'
    end
    object cdsDetailfrozen: TIntegerField
      FieldName = 'frozen'
    end
    object cdsDetailbalancedate: TDateTimeField
      FieldName = 'balancedate'
    end
    object cdsDetailcreate_time: TDateTimeField
      FieldName = 'create_time'
    end
    object cdsDetailcustom11: TFloatField
      FieldName = 'custom11'
    end
    object cdsDetailcustom12: TFloatField
      FieldName = 'custom12'
    end
    object cdsDetailcustom13: TFloatField
      FieldName = 'custom13'
    end
    object cdsDetailcustom14: TFloatField
      FieldName = 'custom14'
    end
    object cdsDetailcustom15: TFloatField
      FieldName = 'custom15'
    end
    object cdsDetaildcbprice: TFloatField
      FieldName = 'dcbprice'
    end
    object cdsDetaildcprice: TFloatField
      FieldName = 'dcprice'
    end
    object cdsDetaildctaxprice: TFloatField
      FieldName = 'dctaxprice'
    end
    object cdsDetaildcproductamt: TFloatField
      FieldName = 'dcproductamt'
    end
    object cdsDetaildctaxamt: TFloatField
      FieldName = 'dctaxamt'
    end
    object cdsDetaildcamount: TFloatField
      FieldName = 'dcamount'
    end
    object cdsDetaillength: TFloatField
      FieldName = 'length'
    end
    object cdsDetailwidth: TFloatField
      FieldName = 'width'
    end
    object cdsDetailheight: TFloatField
      FieldName = 'height'
    end
    object cdsDetailsquare: TFloatField
      FieldName = 'square'
    end
    object cdsDetailcubage: TFloatField
      FieldName = 'cubage'
    end
    object cdsDetailspecificweight: TFloatField
      FieldName = 'specificweight'
    end
    object cdsDetailcustom16: TFloatField
      FieldName = 'custom16'
    end
    object cdsDetailcustom17: TFloatField
      FieldName = 'custom17'
    end
    object cdsDetailcustom18: TFloatField
      FieldName = 'custom18'
    end
    object cdsDetailcustom19: TFloatField
      FieldName = 'custom19'
    end
    object cdsDetailcustom20: TFloatField
      FieldName = 'custom20'
    end
    object cdsDetailreleasedqty: TFloatField
      FieldName = 'releasedqty'
    end
    object cdsDetailreleasedassqty: TFloatField
      FieldName = 'releasedassqty'
    end
    object cdsDetailcompletedqty: TFloatField
      FieldName = 'completedqty'
    end
    object cdsDetailwasterqty: TFloatField
      FieldName = 'wasterqty'
    end
    object cdsDetailmpsqty: TFloatField
      FieldName = 'mpsqty'
    end
    object cdsDetailAllqty: TStringField
      FieldName = 'Allqty'
      Size = 30
    end
    object cdsDetailrelationbcode: TStringField
      FieldName = 'relationbcode'
      Size = 30
    end
    object cdsDetaildiscamt: TFloatField
      FieldName = 'discamt'
    end
    object cdsDetailp_kind: TIntegerField
      FieldName = 'p_kind'
    end
    object cdsDetailp_code: TStringField
      FieldName = 'p_code'
      Size = 40
    end
    object cdsDetailp_name: TWideStringField
      FieldName = 'p_name'
      Size = 60
    end
    object cdsDetailp_spec: TWideStringField
      FieldName = 'p_spec'
      Size = 60
    end
    object cdsDetailp_abname: TWideStringField
      FieldName = 'p_abname'
      Size = 60
    end
    object cdsDetailp_custom1: TStringField
      FieldName = 'p_custom1'
      Size = 100
    end
    object cdsDetailp_custom2: TStringField
      FieldName = 'p_custom2'
      Size = 100
    end
    object cdsDetailp_custom3: TStringField
      FieldName = 'p_custom3'
      Size = 100
    end
    object cdsDetailp_custom4: TStringField
      FieldName = 'p_custom4'
      Size = 100
    end
    object cdsDetailp_custom5: TStringField
      FieldName = 'p_custom5'
      Size = 100
    end
    object cdsDetailp_custom6: TStringField
      FieldName = 'p_custom6'
      Size = 100
    end
    object cdsDetailp_custom7: TStringField
      FieldName = 'p_custom7'
      Size = 100
    end
    object cdsDetailp_custom8: TStringField
      FieldName = 'p_custom8'
      Size = 100
    end
    object cdsDetailp_custom9: TStringField
      FieldName = 'p_custom9'
      Size = 100
    end
    object cdsDetailp_custom10: TStringField
      FieldName = 'p_custom10'
      Size = 100
    end
    object cdsDetailproducttypeid: TIntegerField
      FieldName = 'producttypeid'
    end
    object cdsDetailproducttrademarkid: TIntegerField
      FieldName = 'producttrademarkid'
    end
    object cdsDetaildepotcode: TStringField
      FieldName = 'depotcode'
      Size = 40
    end
    object cdsDetaildepotname: TWideStringField
      FieldName = 'depotname'
      Size = 60
    end
    object cdsDetailbomname: TStringField
      FieldName = 'bomname'
      Size = 60
    end
    object cdsDetailbomcode: TStringField
      FieldName = 'bomcode'
      Size = 40
    end
    object cdsDetailbarcode: TWideStringField
      FieldName = 'barcode'
      Size = 40
    end
    object cdsDetailunitname: TWideStringField
      FieldName = 'unitname'
      Size = 40
    end
    object cdsDetailunitrate: TFloatField
      FieldName = 'unitrate'
    end
    object cdsDetailbaseunitname: TWideStringField
      FieldName = 'baseunitname'
      Size = 40
    end
    object cdsDetailunitassname: TWideStringField
      FieldName = 'unitassname'
      Size = 40
    end
    object cdsDetailfactqty: TFloatField
      FieldName = 'factqty'
    end
    object cdsDetailbookqty: TFloatField
      FieldName = 'bookqty'
    end
    object cdsDetailproductpic: TBlobField
      FieldName = 'productpic'
    end
  end
  inherited qryDetail: TUniQuery
    SQL.Strings = (
      
        'select d.*,cast(dbo.f_getallqty(d.productid,unit1qty,unit2qty,un' +
        'it3qty) as varchar(30)) as Allqty '
      
        '     ,dbo.f_getrelationbcode(d.relationbtype,d.relationbid) as r' +
        'elationbcode'
      
        '     ,round((d.price*(1+d.taxrate/100)/(d.disc/100))*(1-d.disc/1' +
        '00)*d.quantity,2) as discamt'
      
        '     ,p.kind p_kind,p.code p_code, p.name p_name, p.spec p_spec,' +
        ' p.abname p_abname'
      
        '     ,p.custom1 p_custom1, p.custom2 p_custom2, p.custom3 p_cust' +
        'om3, p.custom4 p_custom4, p.custom5 p_custom5 '
      
        '     ,p.custom6 p_custom6, p.custom7 p_custom7, p.custom8 p_cust' +
        'om8, p.custom9 p_custom9, p.custom10 p_custom10 '
      '     ,p.producttypeid, p.producttrademarkid'
      
        '     ,dt.code depotcode, dt.name depotname, v.name bomname, v.co' +
        'de bomcode '
      
        '     ,u.barcode, u.unitname, u.rate unitrate,  t.unitname as bas' +
        'eunitname,l.unitname as unitassname '
      '     ,pic.pic as productpic'
      '     from tb_salequotedtl d'
      '     left join td_product p on d.productid=p.p_id'
      '     left join td_productbomver v on d.bomid=v.bomid'
      '     left join td_depot dt on d.depotid=dt.depotid'
      '     left join td_unitprice u on d.unitid=u.unitid'
      
        '     left join td_unitprice t on (d.productid=t.productid and t.' +
        'baseunit=1)  '
      
        '     left join td_unitprice l on (d.productid=l.productid and l.' +
        'u_no=0)       '
      
        '     left join td_productpic pic on d.productid=pic.productid an' +
        'd pic.defpic=1'
      '     where bid=0 order by d.borderno')
    object qryDetailbid: TIntegerField
      FieldName = 'bid'
    end
    object qryDetailbno: TIntegerField
      FieldName = 'bno'
    end
    object qryDetailborderno: TIntegerField
      FieldName = 'borderno'
    end
    object qryDetaildepotid: TIntegerField
      FieldName = 'depotid'
    end
    object qryDetailproductid: TIntegerField
      FieldName = 'productid'
    end
    object qryDetailbomid: TIntegerField
      FieldName = 'bomid'
    end
    object qryDetailcprice: TFloatField
      FieldName = 'cprice'
    end
    object qryDetailbprice: TFloatField
      FieldName = 'bprice'
    end
    object qryDetailbquantity: TFloatField
      FieldName = 'bquantity'
    end
    object qryDetaildisc: TFloatField
      FieldName = 'disc'
    end
    object qryDetailtaxrate: TFloatField
      FieldName = 'taxrate'
    end
    object qryDetailtaxamt: TFloatField
      FieldName = 'taxamt'
    end
    object qryDetailamount: TFloatField
      FieldName = 'amount'
    end
    object qryDetailunitid: TIntegerField
      FieldName = 'unitid'
    end
    object qryDetailquantity: TFloatField
      FieldName = 'quantity'
    end
    object qryDetailprice: TFloatField
      FieldName = 'price'
    end
    object qryDetailunit1qty: TFloatField
      FieldName = 'unit1qty'
    end
    object qryDetailunit2qty: TFloatField
      FieldName = 'unit2qty'
    end
    object qryDetailunit3qty: TFloatField
      FieldName = 'unit3qty'
    end
    object qryDetailassqty: TFloatField
      FieldName = 'assqty'
    end
    object qryDetailrelationassqty: TFloatField
      FieldName = 'relationassqty'
    end
    object qryDetailproductamt: TFloatField
      FieldName = 'productamt'
    end
    object qryDetailbatchcode: TStringField
      FieldName = 'batchcode'
      Size = 200
    end
    object qryDetailproductdate: TDateTimeField
      FieldName = 'productdate'
    end
    object qryDetailvaliddate: TDateTimeField
      FieldName = 'validdate'
    end
    object qryDetailrelationpid: TIntegerField
      FieldName = 'relationpid'
    end
    object qryDetailrelationcount: TByteField
      FieldName = 'relationcount'
    end
    object qryDetailrelationbtype: TIntegerField
      FieldName = 'relationbtype'
    end
    object qryDetailrelationbid: TIntegerField
      FieldName = 'relationbid'
    end
    object qryDetailrelationbno: TIntegerField
      FieldName = 'relationbno'
    end
    object qryDetailrelationqty: TFloatField
      FieldName = 'relationqty'
    end
    object qryDetailioqty: TFloatField
      FieldName = 'ioqty'
    end
    object qryDetailpause: TBooleanField
      FieldName = 'pause'
    end
    object qryDetailcustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object qryDetailcustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object qryDetailcustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object qryDetailcustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object qryDetailcustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object qryDetailcustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object qryDetailcustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object qryDetailcustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object qryDetailcustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object qryDetailcustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object qryDetailexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object qryDetailtaxprice: TFloatField
      FieldName = 'taxprice'
    end
    object qryDetailformerprice: TFloatField
      FieldName = 'formerprice'
    end
    object qryDetailformertaxprice: TFloatField
      FieldName = 'formertaxprice'
    end
    object qryDetailpresent: TBooleanField
      FieldName = 'present'
    end
    object qryDetailfrozen: TIntegerField
      FieldName = 'frozen'
    end
    object qryDetailbalancedate: TDateTimeField
      FieldName = 'balancedate'
    end
    object qryDetailcreate_time: TDateTimeField
      FieldName = 'create_time'
    end
    object qryDetailcustom11: TFloatField
      FieldName = 'custom11'
    end
    object qryDetailcustom12: TFloatField
      FieldName = 'custom12'
    end
    object qryDetailcustom13: TFloatField
      FieldName = 'custom13'
    end
    object qryDetailcustom14: TFloatField
      FieldName = 'custom14'
    end
    object qryDetailcustom15: TFloatField
      FieldName = 'custom15'
    end
    object qryDetaildcbprice: TFloatField
      FieldName = 'dcbprice'
    end
    object qryDetaildcprice: TFloatField
      FieldName = 'dcprice'
    end
    object qryDetaildctaxprice: TFloatField
      FieldName = 'dctaxprice'
    end
    object qryDetaildcproductamt: TFloatField
      FieldName = 'dcproductamt'
    end
    object qryDetaildctaxamt: TFloatField
      FieldName = 'dctaxamt'
    end
    object qryDetaildcamount: TFloatField
      FieldName = 'dcamount'
    end
    object qryDetaillength: TFloatField
      FieldName = 'length'
    end
    object qryDetailwidth: TFloatField
      FieldName = 'width'
    end
    object qryDetailheight: TFloatField
      FieldName = 'height'
    end
    object qryDetailspecificweight: TFloatField
      FieldName = 'specificweight'
    end
    object qryDetailcubage: TFloatField
      FieldName = 'cubage'
    end
    object qryDetailsquare: TFloatField
      FieldName = 'square'
    end
    object qryDetailcustom16: TFloatField
      FieldName = 'custom16'
    end
    object qryDetailcustom17: TFloatField
      FieldName = 'custom17'
    end
    object qryDetailcustom18: TFloatField
      FieldName = 'custom18'
    end
    object qryDetailcustom19: TFloatField
      FieldName = 'custom19'
    end
    object qryDetailcustom20: TFloatField
      FieldName = 'custom20'
    end
    object qryDetailreleasedqty: TFloatField
      FieldName = 'releasedqty'
    end
    object qryDetailreleasedassqty: TFloatField
      FieldName = 'releasedassqty'
    end
    object qryDetailcompletedqty: TFloatField
      FieldName = 'completedqty'
    end
    object qryDetailwasterqty: TFloatField
      FieldName = 'wasterqty'
    end
    object qryDetailmpsqty: TFloatField
      FieldName = 'mpsqty'
    end
    object qryDetailAllqty: TStringField
      FieldName = 'Allqty'
      Size = 30
    end
    object qryDetailrelationbcode: TStringField
      FieldName = 'relationbcode'
      Size = 30
    end
    object qryDetaildiscamt: TFloatField
      FieldName = 'discamt'
    end
    object qryDetailp_kind: TIntegerField
      FieldName = 'p_kind'
    end
    object qryDetailp_code: TStringField
      FieldName = 'p_code'
      Size = 40
    end
    object qryDetailp_name: TWideStringField
      FieldName = 'p_name'
      Size = 60
    end
    object qryDetailp_spec: TWideStringField
      FieldName = 'p_spec'
      Size = 60
    end
    object qryDetailp_abname: TWideStringField
      FieldName = 'p_abname'
      Size = 60
    end
    object qryDetailp_custom1: TStringField
      FieldName = 'p_custom1'
      Size = 100
    end
    object qryDetailp_custom2: TStringField
      FieldName = 'p_custom2'
      Size = 100
    end
    object qryDetailp_custom3: TStringField
      FieldName = 'p_custom3'
      Size = 100
    end
    object qryDetailp_custom4: TStringField
      FieldName = 'p_custom4'
      Size = 100
    end
    object qryDetailp_custom5: TStringField
      FieldName = 'p_custom5'
      Size = 100
    end
    object qryDetailp_custom6: TStringField
      FieldName = 'p_custom6'
      Size = 100
    end
    object qryDetailp_custom7: TStringField
      FieldName = 'p_custom7'
      Size = 100
    end
    object qryDetailp_custom8: TStringField
      FieldName = 'p_custom8'
      Size = 100
    end
    object qryDetailp_custom9: TStringField
      FieldName = 'p_custom9'
      Size = 100
    end
    object qryDetailp_custom10: TStringField
      FieldName = 'p_custom10'
      Size = 100
    end
    object qryDetailproducttypeid: TIntegerField
      FieldName = 'producttypeid'
    end
    object qryDetailproducttrademarkid: TIntegerField
      FieldName = 'producttrademarkid'
    end
    object qryDetaildepotcode: TStringField
      FieldName = 'depotcode'
      Size = 40
    end
    object qryDetaildepotname: TWideStringField
      FieldName = 'depotname'
      Size = 60
    end
    object qryDetailbomname: TStringField
      FieldName = 'bomname'
      Size = 60
    end
    object qryDetailbomcode: TStringField
      FieldName = 'bomcode'
      Size = 40
    end
    object qryDetailbarcode: TWideStringField
      FieldName = 'barcode'
      Size = 40
    end
    object qryDetailunitname: TWideStringField
      FieldName = 'unitname'
      Size = 40
    end
    object qryDetailunitrate: TFloatField
      FieldName = 'unitrate'
    end
    object qryDetailbaseunitname: TWideStringField
      FieldName = 'baseunitname'
      Size = 40
    end
    object qryDetailunitassname: TWideStringField
      FieldName = 'unitassname'
      Size = 40
    end
    object qryDetailfactqty: TFloatField
      FieldName = 'factqty'
    end
    object qryDetailbookqty: TFloatField
      FieldName = 'bookqty'
    end
    object qryDetailproductpic: TBlobField
      FieldName = 'productpic'
    end
  end
  inherited MainDataSet: TUniQuery
    SQL.Strings = (
      
        'select top 1 m.*, t.scamt,t.iscash,t.code t_code,t.name t_name, ' +
        'n.name moneyname'
      '    from tb_salequote m '
      '     left join td_trader t on m.traderid=t.traderid'
      '     left join td_money n on m.moneyid=n.moneyid'
      '     where 1=1')
    object MainDataSetbid: TIntegerField
      FieldName = 'bid'
    end
    object MainDataSetbkind: TIntegerField
      FieldName = 'bkind'
    end
    object MainDataSetbstate: TIntegerField
      FieldName = 'bstate'
    end
    object MainDataSetbcode: TStringField
      FieldName = 'bcode'
      Size = 40
    end
    object MainDataSetbdate: TDateTimeField
      FieldName = 'bdate'
    end
    object MainDataSettraderid: TIntegerField
      FieldName = 'traderid'
    end
    object MainDataSetfilid: TIntegerField
      FieldName = 'filid'
    end
    object MainDataSetdeptid: TIntegerField
      FieldName = 'deptid'
    end
    object MainDataSetcreate_by: TIntegerField
      FieldName = 'create_by'
    end
    object MainDataSetcheck_by: TIntegerField
      FieldName = 'check_by'
    end
    object MainDataSetempid: TIntegerField
      FieldName = 'empid'
    end
    object MainDataSetrelationcount: TByteField
      FieldName = 'relationcount'
    end
    object MainDataSetamount: TFloatField
      FieldName = 'amount'
    end
    object MainDataSetrelationamt: TFloatField
      FieldName = 'relationamt'
    end
    object MainDataSettransporttype: TIntegerField
      FieldName = 'transporttype'
    end
    object MainDataSetcontactphone: TStringField
      FieldName = 'contactphone'
      Size = 40
    end
    object MainDataSetorderer: TStringField
      FieldName = 'orderer'
      Size = 60
    end
    object MainDataSetcontractno: TStringField
      FieldName = 'contractno'
      Size = 40
    end
    object MainDataSetrevdate: TDateTimeField
      FieldName = 'revdate'
    end
    object MainDataSettargetaddr: TStringField
      FieldName = 'targetaddr'
      Size = 200
    end
    object MainDataSetpause: TBooleanField
      FieldName = 'pause'
    end
    object MainDataSetcustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object MainDataSetcustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object MainDataSetcustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object MainDataSetcustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object MainDataSetcustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object MainDataSetcustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object MainDataSetcustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object MainDataSetcustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object MainDataSetcustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object MainDataSetcustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object MainDataSetcustom11: TFloatField
      FieldName = 'custom11'
    end
    object MainDataSetcustom12: TFloatField
      FieldName = 'custom12'
    end
    object MainDataSetcustom13: TFloatField
      FieldName = 'custom13'
    end
    object MainDataSetcustom14: TFloatField
      FieldName = 'custom14'
    end
    object MainDataSetcustom15: TFloatField
      FieldName = 'custom15'
    end
    object MainDataSetupdate_time: TDateTimeField
      FieldName = 'update_time'
    end
    object MainDataSetremark: TStringField
      FieldName = 'remark'
      Size = 200
    end
    object MainDataSetcontacter: TStringField
      FieldName = 'contacter'
      Size = 60
    end
    object MainDataSetcontactfax: TStringField
      FieldName = 'contactfax'
      Size = 40
    end
    object MainDataSetcreate_time: TDateTimeField
      FieldName = 'create_time'
    end
    object MainDataSetcheck_time: TDateTimeField
      FieldName = 'check_time'
    end
    object MainDataSetmoneyid: TIntegerField
      FieldName = 'moneyid'
    end
    object MainDataSetexchrate: TFloatField
      FieldName = 'exchrate'
    end
    object MainDataSetdcamount: TFloatField
      FieldName = 'dcamount'
    end
    object MainDataSetdcrelationamt: TFloatField
      FieldName = 'dcrelationamt'
    end
    object MainDataSetscamt: TFloatField
      FieldName = 'scamt'
    end
    object MainDataSetiscash: TBooleanField
      FieldName = 'iscash'
    end
    object MainDataSett_code: TWideStringField
      FieldName = 't_code'
      Size = 50
    end
    object MainDataSett_name: TWideStringField
      FieldName = 't_name'
      Size = 80
    end
    object MainDataSetmoneyname: TStringField
      FieldName = 'moneyname'
      Size = 60
    end
    object MainDataSetbalanceid: TIntegerField
      FieldName = 'balanceid'
    end
    object MainDataSettermdays: TIntegerField
      FieldName = 'termdays'
    end
  end
  inherited pmAutoSave: TPopupMenu
    Left = 488
    Top = 352
  end
  object qryBomVer: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO tb_designbomver'
      
        '  (bid, bno, bdtlno, designbomid, bomid, code, name, productid, ' +
        'manhour, quantity, pretime, worklineid, machineid, remark, state' +
        ', create_by, check_by, create_time, update_time, custom1, custom' +
        '2, custom3, custom4, custom5, rawcost, labourcost, assistantcost' +
        ', powercost, electricpowercost, othercost, salereprice, length, ' +
        'width, height, custom6, custom7, custom8, custom9, custom10, cus' +
        'tom11, custom12, custom13, custom14, custom15)'
      'VALUES'
      
        '  (:bid, :bno, :bdtlno, :designbomid, :bomid, :code, :name, :pro' +
        'ductid, :manhour, :quantity, :pretime, :worklineid, :machineid, ' +
        ':remark, :state, :create_by, :check_by, :create_time, :update_ti' +
        'me, :custom1, :custom2, :custom3, :custom4, :custom5, :rawcost, ' +
        ':labourcost, :assistantcost, :powercost, :electricpowercost, :ot' +
        'hercost, :salereprice, :length, :width, :height, :custom6, :cust' +
        'om7, :custom8, :custom9, :custom10, :custom11, :custom12, :custo' +
        'm13, :custom14, :custom15)')
    SQLDelete.Strings = (
      'DELETE FROM tb_designbomver'
      'WHERE'
      '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno')
    SQLUpdate.Strings = (
      'UPDATE tb_designbomver'
      'SET'
      
        '  bid = :bid, bno = :bno, bdtlno = :bdtlno, designbomid = :desig' +
        'nbomid, bomid = :bomid, code = :code, name = :name, productid = ' +
        ':productid, manhour = :manhour, quantity = :quantity, pretime = ' +
        ':pretime, worklineid = :worklineid, machineid = :machineid, rema' +
        'rk = :remark, state = :state, create_by = :create_by, check_by =' +
        ' :check_by, create_time = :create_time, update_time = :update_ti' +
        'me, custom1 = :custom1, custom2 = :custom2, custom3 = :custom3, ' +
        'custom4 = :custom4, custom5 = :custom5, rawcost = :rawcost, labo' +
        'urcost = :labourcost, assistantcost = :assistantcost, powercost ' +
        '= :powercost, electricpowercost = :electricpowercost, othercost ' +
        '= :othercost, salereprice = :salereprice, length = :length, widt' +
        'h = :width, height = :height, custom6 = :custom6, custom7 = :cus' +
        'tom7, custom8 = :custom8, custom9 = :custom9, custom10 = :custom' +
        '10, custom11 = :custom11, custom12 = :custom12, custom13 = :cust' +
        'om13, custom14 = :custom14, custom15 = :custom15'
      'WHERE'
      '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno')
    SQLLock.Strings = (
      'SELECT * FROM tb_designbomver'
      'WITH (UPDLOCK, ROWLOCK, HOLDLOCK)'
      'WHERE'
      '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno')
    SQLRefresh.Strings = (
      
        'SELECT bid, bno, designbomid, bomid, code, name, productid, manh' +
        'our, quantity, pretime, worklineid, machineid, remark, state, cr' +
        'eate_by, check_by, create_time, update_time, custom1, custom2, c' +
        'ustom3, custom4, custom5, rawcost, salereprice, length, width, h' +
        'eight, custom6, custom7, custom8, custom9, custom10, custom11, c' +
        'ustom12, custom13, custom14, custom15 FROM tb_designbomver'
      'WHERE'
      '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno')
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select * from tb_designbomver where bid=:bid')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    SpecificOptions.Strings = (
      'SQL Server.CheckRowVersion=True')
    OnNewRecord = qryBomVerNewRecord
    Left = 552
    Top = 300
    ParamData = <
      item
        DataType = ftInteger
        Name = 'bid'
        ParamType = ptInput
        Value = 0
      end>
    object qryBomVerbid: TIntegerField
      FieldName = 'bid'
    end
    object qryBomVerbno: TIntegerField
      FieldName = 'bno'
    end
    object qryBomVerbdtlno: TIntegerField
      FieldName = 'bdtlno'
    end
    object qryBomVerdesignbomid: TIntegerField
      FieldName = 'designbomid'
    end
    object qryBomVerbomid: TIntegerField
      FieldName = 'bomid'
    end
    object qryBomVercode: TStringField
      FieldName = 'code'
      Size = 40
    end
    object qryBomVername: TStringField
      FieldName = 'name'
      Size = 60
    end
    object qryBomVerproductid: TIntegerField
      FieldName = 'productid'
    end
    object qryBomVermanhour: TFloatField
      FieldName = 'manhour'
    end
    object qryBomVerquantity: TFloatField
      FieldName = 'quantity'
    end
    object qryBomVerqtypercent: TBooleanField
      FieldName = 'qtypercent'
    end
    object qryBomVerpretime: TFloatField
      FieldName = 'pretime'
    end
    object qryBomVerworklineid: TIntegerField
      FieldName = 'worklineid'
    end
    object qryBomVermachineid: TIntegerField
      FieldName = 'machineid'
    end
    object qryBomVerremark: TStringField
      FieldName = 'remark'
      Size = 200
    end
    object qryBomVerstate: TIntegerField
      FieldName = 'state'
    end
    object qryBomVercreate_by: TIntegerField
      FieldName = 'create_by'
    end
    object qryBomVercheck_by: TIntegerField
      FieldName = 'check_by'
    end
    object qryBomVercreate_time: TDateTimeField
      FieldName = 'create_time'
    end
    object qryBomVerupdate_time: TDateTimeField
      FieldName = 'update_time'
    end
    object qryBomVercustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object qryBomVercustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object qryBomVercustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object qryBomVercustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object qryBomVercustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object qryBomVerrawcost: TFloatField
      FieldName = 'rawcost'
    end
    object qryBomVerlabourcost: TFloatField
      FieldName = 'labourcost'
    end
    object qryBomVerassistantcost: TFloatField
      FieldName = 'assistantcost'
    end
    object qryBomVerpowercost: TFloatField
      FieldName = 'powercost'
    end
    object qryBomVerelectricpowercost: TFloatField
      FieldName = 'electricpowercost'
    end
    object qryBomVerothercost: TFloatField
      FieldName = 'othercost'
    end
    object qryBomVersalereprice: TFloatField
      FieldName = 'salereprice'
    end
    object qryBomVerlength: TFloatField
      FieldName = 'length'
    end
    object qryBomVerwidth: TFloatField
      FieldName = 'width'
    end
    object qryBomVerheight: TFloatField
      FieldName = 'height'
    end
    object qryBomVercustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object qryBomVercustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object qryBomVercustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object qryBomVercustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object qryBomVercustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object qryBomVercustom11: TFloatField
      FieldName = 'custom11'
    end
    object qryBomVercustom12: TFloatField
      FieldName = 'custom12'
    end
    object qryBomVercustom13: TFloatField
      FieldName = 'custom13'
    end
    object qryBomVercustom14: TFloatField
      FieldName = 'custom14'
    end
    object qryBomVercustom15: TFloatField
      FieldName = 'custom15'
    end
  end
  object qryBom: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO tb_designbom'
      
        '  (bid, bno, bdtlno, orderno, designbomid, rawproductid, rawno, ' +
        'rawbomid, rawpercent, rawqty, cprice, partid, wasterate, explan,' +
        ' worklineid, workprocid, custom1, custom2, custom3, custom4, cus' +
        'tom5, create_by, traderid, length, width, height, qtyformulaid, ' +
        'custom6, custom7, custom8, custom9, custom10, custom11, custom12' +
        ', custom13, custom14, custom15, rawquantity, lengthformulaid, wi' +
        'dthformulaid, heightformulaid)'
      'VALUES'
      
        '  (:bid, :bno, :bdtlno, :orderno, :designbomid, :rawproductid, :' +
        'rawno, :rawbomid, :rawpercent, :rawqty, :cprice, :partid, :waste' +
        'rate, :explan, :worklineid, :workprocid, :custom1, :custom2, :cu' +
        'stom3, :custom4, :custom5, :create_by, :traderid, :length, :widt' +
        'h, :height, :qtyformulaid, :custom6, :custom7, :custom8, :custom' +
        '9, :custom10, :custom11, :custom12, :custom13, :custom14, :custo' +
        'm15, :rawquantity, :lengthformulaid, :widthformulaid, :heightfor' +
        'mulaid)')
    SQLDelete.Strings = (
      'DELETE FROM tb_designbom'
      'WHERE'
      
        '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno AND' +
        ' rawno = :Old_rawno')
    SQLUpdate.Strings = (
      'UPDATE tb_designbom'
      'SET'
      
        '  bid = :bid, bno = :bno, bdtlno = :bdtlno, orderno = :orderno, ' +
        'designbomid = :designbomid, rawproductid = :rawproductid, rawno ' +
        '= :rawno, rawbomid = :rawbomid, rawpercent = :rawpercent, rawqty' +
        ' = :rawqty, cprice = :cprice, partid = :partid, wasterate = :was' +
        'terate, explan = :explan, worklineid = :worklineid, workprocid =' +
        ' :workprocid, custom1 = :custom1, custom2 = :custom2, custom3 = ' +
        ':custom3, custom4 = :custom4, custom5 = :custom5, create_by = :c' +
        'reate_by, traderid = :traderid, length = :length, width = :width' +
        ', height = :height, qtyformulaid = :qtyformulaid, custom6 = :cus' +
        'tom6, custom7 = :custom7, custom8 = :custom8, custom9 = :custom9' +
        ', custom10 = :custom10, custom11 = :custom11, custom12 = :custom' +
        '12, custom13 = :custom13, custom14 = :custom14, custom15 = :cust' +
        'om15'
      
        ', rawquantity = :rawquantity, lengthformulaid = :lengthformulaid' +
        ', widthformulaid = :widthformulaid, heightformulaid = :heightfor' +
        'mulaid'
      'WHERE'
      
        '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno AND' +
        ' rawno = :Old_rawno')
    SQLLock.Strings = (
      'SELECT * FROM tb_designbom'
      'WITH (UPDLOCK, ROWLOCK, HOLDLOCK)'
      'WHERE'
      
        '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno AND' +
        ' rawno = :Old_rawno')
    SQLRefresh.Strings = (
      
        'SELECT bid, bno, bdtlno, orderno, designbomid, rawproductid, raw' +
        'no, rawbomid, rawqty, wasterate, explan, worklineid, workprocid,' +
        ' custom1, custom2, custom3, custom4, custom5, create_by, traderi' +
        'd, length, width, height, custom6, custom7, custom8, custom9, cu' +
        'stom10, custom11, custom12, custom13, custom14, custom15 FROM tb' +
        '_designbom'
      'WHERE'
      
        '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno AND' +
        ' rawno = :Old_rawno')
    Connection = MainDM.UniConn
    SQL.Strings = (
      
        'select b.*,p.code p_code,p.name p_name,p.spec p_spec,pt.code par' +
        'tcode,pt.name partname'
      
        '  ,pf.calcexpressshow formulaname,round(b.cprice*b.rawquantity,2' +
        ') as amount'
      '  ,plf.calcexpressshow lformulaname'
      '  ,pwf.calcexpressshow wformulaname'
      '  ,phf.calcexpressshow hformulaname'
      '  from tb_designbom b '
      '  join td_product p on b.rawproductid=p.p_id '
      '  left join td_productbompart pt on b.partid=pt.id'
      '  left join td_productbomformula pf on b.qtyformulaid=pf.id'
      '  left join td_productbomformula plf on b.lengthformulaid=pf.id'
      '  left join td_productbomformula pwf on b.widthformulaid=pf.id'
      '  left join td_productbomformula phf on b.heightformulaid=pf.id'
      '  where bid=:bid')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Options.FlatBuffers = True
    SpecificOptions.Strings = (
      'SQL Server.CheckRowVersion=True')
    OnNewRecord = qryBomNewRecord
    Left = 552
    Top = 345
    ParamData = <
      item
        DataType = ftInteger
        Name = 'bid'
        ParamType = ptInput
        Value = 0
      end>
    object qryBombid: TIntegerField
      FieldName = 'bid'
    end
    object qryBombno: TIntegerField
      FieldName = 'bno'
    end
    object qryBombdtlno: TIntegerField
      FieldName = 'bdtlno'
    end
    object qryBomorderno: TStringField
      FieldName = 'orderno'
      Size = 40
    end
    object qryBomdesignbomid: TIntegerField
      FieldName = 'designbomid'
    end
    object qryBomrawproductid: TIntegerField
      FieldName = 'rawproductid'
    end
    object qryBomrawno: TIntegerField
      FieldName = 'rawno'
    end
    object qryBomrawbomid: TIntegerField
      FieldName = 'rawbomid'
    end
    object qryBomrawpercent: TFloatField
      FieldName = 'rawpercent'
    end
    object qryBomrawqty: TFloatField
      FieldName = 'rawqty'
    end
    object qryBomcprice: TFloatField
      FieldName = 'cprice'
    end
    object qryBomwasterate: TFloatField
      FieldName = 'wasterate'
    end
    object qryBomexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object qryBompartid: TIntegerField
      FieldName = 'partid'
    end
    object qryBomworklineid: TIntegerField
      FieldName = 'worklineid'
    end
    object qryBomworkprocid: TIntegerField
      FieldName = 'workprocid'
    end
    object qryBomcustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object qryBomcustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object qryBomcustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object qryBomcustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object qryBomcustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object qryBomcreate_by: TIntegerField
      FieldName = 'create_by'
    end
    object qryBomtraderid: TIntegerField
      FieldName = 'traderid'
    end
    object qryBomlength: TFloatField
      FieldName = 'length'
    end
    object qryBomwidth: TFloatField
      FieldName = 'width'
    end
    object qryBomheight: TFloatField
      FieldName = 'height'
    end
    object qryBomcustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object qryBomcustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object qryBomcustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object qryBomcustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object qryBomcustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object qryBomcustom11: TFloatField
      FieldName = 'custom11'
    end
    object qryBomcustom12: TFloatField
      FieldName = 'custom12'
    end
    object qryBomcustom13: TFloatField
      FieldName = 'custom13'
    end
    object qryBomcustom14: TFloatField
      FieldName = 'custom14'
    end
    object qryBomcustom15: TFloatField
      FieldName = 'custom15'
    end
    object qryBomlengthformulaid: TIntegerField
      FieldName = 'lengthformulaid'
    end
    object qryBomwidthformulaid: TIntegerField
      FieldName = 'widthformulaid'
    end
    object qryBomheightformulaid: TIntegerField
      FieldName = 'heightformulaid'
    end
    object qryBomqtyformulaid: TIntegerField
      FieldName = 'qtyformulaid'
    end
    object qryBomrawquantity: TFloatField
      FieldName = 'rawquantity'
    end
    object qryBomp_code: TStringField
      FieldName = 'p_code'
      Size = 40
    end
    object qryBomp_name: TWideStringField
      FieldName = 'p_name'
      Size = 60
    end
    object qryBomp_spec: TWideStringField
      FieldName = 'p_spec'
      Size = 60
    end
    object qryBompartcode: TWideStringField
      FieldName = 'partcode'
      Size = 40
    end
    object qryBompartname: TWideStringField
      FieldName = 'partname'
      Size = 60
    end
    object qryBomformulaname: TWideStringField
      FieldName = 'formulaname'
      Size = 200
    end
    object qryBomamount: TFloatField
      FieldName = 'amount'
    end
    object qryBomlformulaname: TWideStringField
      FieldName = 'lformulaname'
      Size = 200
    end
    object qryBomwformulaname: TWideStringField
      FieldName = 'wformulaname'
      Size = 200
    end
    object qryBomhformulaname: TWideStringField
      FieldName = 'hformulaname'
      Size = 200
    end
  end
  object qryProc: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO tb_designbomproc'
      
        '  (bid, bno, bdtlno, designbomid, pno, orderno, explan, workproc' +
        'id, workshopid, workcenterid, machineid, manhour, pretime, empid' +
        ', custom1, custom2, custom3, custom4, custom5, custom6, custom7,' +
        ' custom8, custom9, custom10, custom11, custom12, custom13, custo' +
        'm14, custom15)'
      'VALUES'
      
        '  (:bid, :bno, :bdtlno, :designbomid, :pno, :orderno, :explan, :' +
        'workprocid, :workshopid, :workcenterid, :machineid, :manhour, :p' +
        'retime, :empid, :custom1, :custom2, :custom3, :custom4, :custom5' +
        ', :custom6, :custom7, :custom8, :custom9, :custom10, :custom11, ' +
        ':custom12, :custom13, :custom14, :custom15)')
    SQLDelete.Strings = (
      'DELETE FROM tb_designbomproc'
      'WHERE'
      
        '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno AND' +
        ' pno = :Old_pno')
    SQLUpdate.Strings = (
      'UPDATE tb_designbomproc'
      'SET'
      
        '  bid = :bid, bno = :bno, bdtlno = :bdtlno, designbomid = :desig' +
        'nbomid, pno = :pno, orderno = :orderno, explan = :explan, workpr' +
        'ocid = :workprocid, workshopid = :workshopid, workcenterid = :wo' +
        'rkcenterid, machineid = :machineid, manhour = :manhour, pretime ' +
        '= :pretime, empid = :empid, custom1 = :custom1, custom2 = :custo' +
        'm2, custom3 = :custom3, custom4 = :custom4, custom5 = :custom5, ' +
        'custom6 = :custom6, custom7 = :custom7, custom8 = :custom8, cust' +
        'om9 = :custom9, custom10 = :custom10, custom11 = :custom11, cust' +
        'om12 = :custom12, custom13 = :custom13, custom14 = :custom14, cu' +
        'stom15 = :custom15'
      'WHERE'
      
        '  bid = :Old_bid AND bno = :Old_bno AND bdtlno = :Old_bdtlno AND' +
        ' pno = :Old_pno')
    Connection = MainDM.UniConn
    SQL.Strings = (
      
        'select p.*,pf.calcexpressshow pformulaname from tb_designbomproc' +
        ' p '
      '  left join td_productbomformula pf on p.makeqtyformulaid=pf.id'
      '  where bid=:bid')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    OnNewRecord = qryProcNewRecord
    Left = 552
    Top = 393
    ParamData = <
      item
        DataType = ftInteger
        Name = 'bid'
        ParamType = ptInput
        Value = nil
      end>
    object qryProcbid: TIntegerField
      FieldName = 'bid'
    end
    object qryProcbno: TIntegerField
      FieldName = 'bno'
    end
    object qryProcbdtlno: TIntegerField
      FieldName = 'bdtlno'
    end
    object qryProcdesignbomid: TIntegerField
      FieldName = 'designbomid'
    end
    object qryProcpno: TIntegerField
      FieldName = 'pno'
    end
    object qryProcorderno: TStringField
      FieldName = 'orderno'
      Size = 40
    end
    object qryProcexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object qryProcworkprocid: TIntegerField
      FieldName = 'workprocid'
    end
    object qryProcworkshopid: TIntegerField
      FieldName = 'workshopid'
    end
    object qryProcworkcenterid: TIntegerField
      FieldName = 'workcenterid'
    end
    object qryProcmachineid: TIntegerField
      FieldName = 'machineid'
    end
    object qryProcmanhour: TFloatField
      FieldName = 'manhour'
    end
    object qryProcpretime: TFloatField
      FieldName = 'pretime'
    end
    object qryProcempid: TIntegerField
      FieldName = 'empid'
    end
    object qryProccustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object qryProccustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object qryProccustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object qryProccustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object qryProccustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object qryProccustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object qryProccustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object qryProccustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object qryProccustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object qryProccustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object qryProccustom11: TFloatField
      FieldName = 'custom11'
    end
    object qryProccustom12: TFloatField
      FieldName = 'custom12'
    end
    object qryProccustom13: TFloatField
      FieldName = 'custom13'
    end
    object qryProccustom14: TFloatField
      FieldName = 'custom14'
    end
    object qryProccustom15: TFloatField
      FieldName = 'custom15'
    end
    object qryProcprice: TFloatField
      FieldName = 'price'
    end
    object qryProcunit: TStringField
      FieldName = 'unit'
    end
    object qryProcmakeprice: TFloatField
      FieldName = 'makeprice'
    end
    object qryProcmakeqty: TFloatField
      FieldName = 'makeqty'
    end
    object qryProcmakeqtyformulaid: TIntegerField
      FieldName = 'makeqtyformulaid'
    end
    object qryProcpformulaname: TWideStringField
      FieldName = 'pformulaname'
      Size = 200
    end
  end
  object dsBomVer: TDataSource
    DataSet = qryBomVer
    Left = 600
    Top = 305
  end
  object dsBom: TDataSource
    DataSet = qryBom
    Left = 608
    Top = 353
  end
  object dsProc: TDataSource
    DataSet = qryProc
    Left = 608
    Top = 401
  end
  object pmBom: TPopupMenu
    OnPopup = pmBomPopup
    Left = 728
    Top = 367
    object muAutoLoadDefBom: TMenuItem
      Caption = #33258#21160#36733#20837#26631#20934#29289#26009#28165#21333
      OnClick = muAutoLoadDefBomClick
    end
    object muLoadDefBomVer: TMenuItem
      Caption = #36733#20837#26631#20934#29256#26412#29289#26009#28165#21333
      OnClick = muLoadDefBomVerClick
    end
    object muLoadOtherBomVer: TMenuItem
      Caption = #36733#20837#20854#20182#29256#26412#29289#26009#28165#21333
    end
    object muLoadBomPart: TMenuItem
      Caption = '-'
    end
    object muDesignAffix: TMenuItem
      Caption = #25171#26679#38468#20214
      OnClick = muDesignAffixClick
    end
    object muSaveBomPart: TMenuItem
      Caption = '-'
    end
    object muSaveToProductBom: TMenuItem
      Caption = #20445#23384#20026#27491#24335#29289#26009#28165#21333
      OnClick = muSaveToProductBomClick
    end
    object muSetDefBom: TMenuItem
      Caption = #35774#32622#20026#26631#20934#29289#26009#28165#21333
      OnClick = muSetDefBomClick
    end
    object muRawCostPart: TMenuItem
      Caption = '-'
    end
    object muRawCostDepot: TMenuItem
      Caption = #26448#26009#25104#26412#20351#29992#24211#23384#25104#26412
      OnClick = muRawCostDepotClick
    end
    object muRawCostRePrice: TMenuItem
      Tag = 1
      Caption = #26448#26009#25104#26412#20351#29992#21442#32771#36827#20215
      OnClick = muRawCostDepotClick
    end
    object muDesignBomDelPart: TMenuItem
      Caption = '-'
    end
    object muDelDesignBomVer: TMenuItem
      Caption = #21024#38500#24403#21069#25171#26679#29256#26412
      OnClick = muDelDesignBomVerClick
    end
    object muDelRaw: TMenuItem
      Caption = #21024#38500#24403#21069#29289#26009
      OnClick = muDelRawClick
    end
    object muDelProc: TMenuItem
      Caption = #21024#38500#24403#21069#24037#24207
      OnClick = muDelProcClick
    end
    object muDesignBomAddPart: TMenuItem
      Caption = '-'
    end
    object muAppendBom: TMenuItem
      Caption = #26032#22686#29289#26009
      OnClick = muAppendBomClick
    end
    object muAppendProc: TMenuItem
      Caption = #26032#22686#24037#24207
      OnClick = muAppendProcClick
    end
    object muAppendBomVer: TMenuItem
      Caption = #26032#22686#25171#26679#29256#26412
      OnClick = muAppendBomVerClick
    end
    object mu_BomExcelPart: TMenuItem
      Caption = '-'
    end
    object muBomGroup: TMenuItem
      Caption = #25353#36135#21697#20998#32452#29289#26009
      OnClick = muBomGroupClick
    end
    object muBomUnGroup: TMenuItem
      Caption = #21462#28040#29289#26009#20998#32452
      OnClick = muBomUnGroupClick
    end
    object muBomExcel: TMenuItem
      Caption = #24403#21069#29289#26009#29256#26412#23548#20986'Excel'
      OnClick = muBomExcelClick
    end
    object muBomGroupExcel: TMenuItem
      Caption = #24403#21069#29289#26009#29256#26412#25353#36135#21697#20998#32452#23548#20986'Excel'
      OnClick = muBomGroupExcelClick
    end
  end
  object mGrdPop: TcxGridPopupMenu
    Grid = grdBom
    PopupMenus = <>
    Left = 392
    Top = 239
  end
end
